<#include "../common/head.ftl" />
<!DOCTYPE html>
<html>
<head lang="en">
	<@comme_head/>
	<@comme_map/>
    <meta charset="UTF-8">
    <title>全国园所信息统计地图</title>
</head>
<body>
<@comme_header/>
<div class="main clearfix" id="main">
    <@comme_daohang />
    <div class="right-content">
        <div class="content">
            <div id="echart" style="width:900px;height:600px; margin:20px auto"></div>
        </div>
    </div>
</div>
<script>
window.onload=function(){
    var myChart = echarts.init(document.getElementById("echart"));
    //该方法为加载后台数据
    function randomData(t) {
        return Math.round(Math.random()*160);
    }
    var option = {
        title: {
            text: '全国园所统计',
            left: 'center'
        },
        tooltip: { //鼠标停留的悬浮框
            trigger: 'item',
            formatter: function(params) {
                var res = params.name;
                var myseries = option.series;
                for (var i = 0; i < myseries.length; i++) {
                    res += '<br/>' + myseries[i].name + '：';
                    //console.log(myseries[i].data[1]);
                    for(var j = 0;j<myseries[i].data.length;j++){
                        if(myseries[i].data[j].name == params.name ){
                            res += myseries[i].data[j].value;
                        }
                    }
                }
                return res;
            }
        },
        legend: {                 //图例模块
            orient: 'vertical',  //所有的图例是水平/垂直，默认‘horizontal’是水平的。
            left: 'left',
            data:['园所总数量','公立数量','私立数量','代理销售数量','内部销售数量']//图例的内容
        },
        color: [
            '#ff5e3a', '#6A6AFF', '#8fd239', '#7f8ede', '#4ac7b6', '#91d23e', '#ff5e3a', '#ff9500', '#1798d1', '#84adc2', '#e36df8'
        ],
        visualMap: {//值域条
            show: false,
            max: 1000,
            min: 0,
            left: 'left',
            inRange: {
                //color:['#16b5e5','#a5ddee']
                color: [
                    '#ff5e3a', '#6A6AFF', '#8fd239', '#7f8ede', '#4ac7b6', '#91d23e', '#ff5e3a', '#ff9500', '#1798d1', '#84adc2', '#e36df8'
                ]
            },
            top: 'bottom',
            text: ['高','低'],           // 文本，默认为数值文本
            calculable: true            //在值域条上是否能拖拽
        },
        series: [                       //系列列表，不同类型通过type指定
            {
                name: '园所总数量',        //系列名称，悬浮框和图标会与其有联系
                type: 'map',            //指定类型
                symbol: 'none',
                mapType: 'china',       //按照自己的需要下载的地图
                roam: false,            //是否开启鼠标缩放和拖拽
                label: {                //图形上的文本标签
                    normal: {           //普通情况下
                        show: true      //是否显示（还有个'textStyle:{}'可以设置文本样式）
                    },
                    emphasis: {         //高亮情况下
                        show: true      //是否显示（还有个'textStyle:{}'可以设置文本样式）
                    }
                },
                showLegendSymbol:false,
                data:[                  //数据组
                    {name: '北京',value: ${北京市.gardenSum} },//键值对形式
                    {name: '天津',value: ${天津市.gardenSum} },
                    {name: '上海',value: ${上海市.gardenSum} },
                    {name: '重庆',value: ${重庆市.gardenSum} },
                    {name: '河北',value: ${河北省.gardenSum} },
                    {name: '河南',value: ${河南省.gardenSum} },
                    {name: '云南',value: ${云南省.gardenSum} },
                    {name: '辽宁',value: ${辽宁省.gardenSum} },
                    {name: '黑龙江',value: ${黑龙江.gardenSum} },
                    {name: '湖南',value: ${湖南省.gardenSum} },
                    {name: '安徽',value: ${安徽省.gardenSum} },
                    {name: '山东',value: ${山东省.gardenSum} },
                    {name: '新疆',value: ${新疆.gardenSum} },
                    {name: '江苏',value: ${江苏省.gardenSum} },
                    {name: '浙江',value: ${浙江省.gardenSum} },
                    {name: '江西',value: ${江西省.gardenSum} },
                    {name: '湖北',value: ${湖北省.gardenSum} },
                    {name: '广西',value: ${广西.gardenSum} },
                    {name: '甘肃',value: ${甘肃省.gardenSum} },
                    {name: '山西',value: ${山西省.gardenSum} },
                    {name: '内蒙古',value: ${内蒙古.gardenSum} },
                    {name: '陕西',value: ${陕西省.gardenSum} },
                    {name: '吉林',value: ${吉林省.gardenSum} },
                    {name: '福建',value: ${福建省.gardenSum} },
                    {name: '贵州',value: ${贵州省.gardenSum} },
                    {name: '广东',value: ${广东省.gardenSum} },
                    {name: '青海',value: ${青海省.gardenSum} },
                    {name: '西藏',value: ${西藏.gardenSum} },
                    {name: '四川',value: ${四川省.gardenSum} },
                    {name: '宁夏',value: ${宁夏.gardenSum} },
                    {name: '海南',value: ${海南省.gardenSum} },
                    {name: '台湾',value: ${台湾省.gardenSum} },
                    {name: '香港',value: ${香港.gardenSum} },
                    {name: '澳门',value: ${澳门.gardenSum} }
                ],
                /*markPoint:{
                     show:true,
                     symbolSize:200,
                     silent:false,
                     label:{
                         emphasis:{show:true,position:'right'},
                         formatter:'{c}'
                     },
                     textStyle:{
                        color:'#000'
                     }
                 },*/
                itemStyle:{
                    normal:{
                        //color:'pink'
                    },
                    emphasis:{
                        areaColor:'pink'
                    }
                }
            },
            {
                name: '公立数量',
                type: 'map',
                mapType: 'china',
                label: {
                    normal: {
                        show: true
                    },
                    emphasis: {
                        show: true
                    }
                },
                showLegendSymbol:false,
                data:[
                    {name: '北京',value: ${北京市.publicSum} },//键值对形式
                    {name: '天津',value: ${天津市.publicSum} },
                    {name: '上海',value: ${上海市.publicSum} },
                    {name: '重庆',value: ${重庆市.publicSum} },
                    {name: '河北',value: ${河北省.publicSum} },
                    {name: '河南',value: ${河南省.publicSum} },
                    {name: '云南',value: ${云南省.publicSum} },
                    {name: '辽宁',value: ${辽宁省.publicSum} },
                    {name: '黑龙江',value: ${黑龙江.publicSum} },
                    {name: '湖南',value: ${湖南省.publicSum} },
                    {name: '安徽',value: ${安徽省.publicSum} },
                    {name: '山东',value: ${山东省.publicSum} },
                    {name: '新疆',value: ${新疆.publicSum} },
                    {name: '江苏',value: ${江苏省.publicSum} },
                    {name: '浙江',value: ${浙江省.publicSum} },
                    {name: '江西',value: ${江西省.publicSum} },
                    {name: '湖北',value: ${湖北省.publicSum} },
                    {name: '广西',value: ${广西.publicSum} },
                    {name: '甘肃',value: ${甘肃省.publicSum} },
                    {name: '山西',value: ${山西省.publicSum} },
                    {name: '内蒙古',value: ${内蒙古.publicSum} },
                    {name: '陕西',value: ${陕西省.publicSum} },
                    {name: '吉林',value: ${吉林省.publicSum} },
                    {name: '福建',value: ${福建省.publicSum} },
                    {name: '贵州',value: ${贵州省.publicSum} },
                    {name: '广东',value: ${广东省.publicSum} },
                    {name: '青海',value: ${青海省.publicSum} },
                    {name: '西藏',value: ${西藏.publicSum} },
                    {name: '四川',value: ${四川省.publicSum} },
                    {name: '宁夏',value: ${宁夏.publicSum} },
                    {name: '海南',value: ${海南省.publicSum} },
                    {name: '台湾',value: ${台湾省.publicSum} },
                    {name: '香港',value: ${香港.publicSum} },
                    {name: '澳门',value: ${澳门.publicSum} }
                ]
            },
            {
                name: '私立数量',
                type: 'map',
                mapType: 'china',
                label: {
                    normal: {
                        show: true
                    },
                    emphasis: {
                        show: true
                    }
                },
                showLegendSymbol:false,
                data:[
                    {name: '北京',value: ${北京市.privateSum} },//键值对形式
                    {name: '天津',value: ${天津市.privateSum} },
                    {name: '上海',value: ${上海市.privateSum} },
                    {name: '重庆',value: ${重庆市.privateSum} },
                    {name: '河北',value: ${河北省.publicSum} },
                    {name: '河南',value: ${河南省.publicSum} },
                    {name: '云南',value: ${云南省.privateSum} },
                    {name: '辽宁',value: ${辽宁省.privateSum} },
                    {name: '黑龙江',value: ${黑龙江.privateSum} },
                    {name: '湖南',value: ${湖南省.privateSum} },
                    {name: '安徽',value: ${安徽省.privateSum} },
                    {name: '山东',value: ${山东省.privateSum} },
                    {name: '新疆',value: ${新疆.privateSum} },
                    {name: '江苏',value: ${江苏省.privateSum} },
                    {name: '浙江',value: ${浙江省.privateSum} },
                    {name: '江西',value: ${江西省.privateSum} },
                    {name: '湖北',value: ${湖北省.privateSum} },
                    {name: '广西',value: ${广西.privateSum} },
                    {name: '甘肃',value: ${甘肃省.privateSum} },
                    {name: '山西',value: ${山西省.privateSum} },
                    {name: '内蒙古',value: ${内蒙古.privateSum} },
                    {name: '陕西',value: ${陕西省.privateSum} },
                    {name: '吉林',value: ${吉林省.privateSum} },
                    {name: '福建',value: ${福建省.privateSum} },
                    {name: '贵州',value: ${贵州省.privateSum} },
                    {name: '广东',value: ${广东省.privateSum} },
                    {name: '青海',value: ${青海省.privateSum} },
                    {name: '西藏',value: ${西藏.privateSum} },
                    {name: '四川',value: ${四川省.privateSum} },
                    {name: '宁夏',value: ${宁夏.privateSum} },
                    {name: '海南',value: ${海南省.privateSum} },
                    {name: '台湾',value: ${台湾省.privateSum} },
                    {name: '香港',value: ${香港.privateSum} },
                    {name: '澳门',value: ${澳门.privateSum} }
                ]
            },
            {
                name: '代理销售数量',
                type: 'map',
                mapType: 'china',
                label: {
                    normal: {
                        show: true
                    },
                    emphasis: {
                        show: true
                    }
                },
                showLegendSymbol:false,
                data:[
                    {name: '北京',value: ${北京市.agentSum} },//键值对形式
                    {name: '天津',value: ${天津市.agentSum} },
                    {name: '上海',value: ${上海市.agentSum} },
                    {name: '重庆',value: ${重庆市.agentSum} },
                    {name: '河北',value: ${河北省.agentSum} },
                    {name: '河南',value: ${河南省.agentSum} },
                    {name: '云南',value: ${云南省.agentSum} },
                    {name: '辽宁',value: ${辽宁省.agentSum} },
                    {name: '黑龙江',value: ${黑龙江.agentSum} },
                    {name: '湖南',value: ${湖南省.agentSum} },
                    {name: '安徽',value: ${安徽省.agentSum} },
                    {name: '山东',value: ${山东省.agentSum} },
                    {name: '新疆',value: ${新疆.agentSum} },
                    {name: '江苏',value: ${江苏省.agentSum} },
                    {name: '浙江',value: ${浙江省.agentSum} },
                    {name: '江西',value: ${江西省.agentSum} },
                    {name: '湖北',value: ${湖北省.agentSum} },
                    {name: '广西',value: ${广西.agentSum} },
                    {name: '甘肃',value: ${甘肃省.agentSum} },
                    {name: '山西',value: ${山西省.agentSum} },
                    {name: '内蒙古',value: ${内蒙古.agentSum} },
                    {name: '陕西',value: ${陕西省.agentSum} },
                    {name: '吉林',value: ${吉林省.agentSum} },
                    {name: '福建',value: ${福建省.agentSum} },
                    {name: '贵州',value: ${贵州省.agentSum} },
                    {name: '广东',value: ${广东省.agentSum} },
                    {name: '青海',value: ${青海省.agentSum} },
                    {name: '西藏',value: ${西藏.agentSum} },
                    {name: '四川',value: ${四川省.agentSum} },
                    {name: '宁夏',value: ${宁夏.agentSum} },
                    {name: '海南',value: ${海南省.agentSum} },
                    {name: '台湾',value: ${台湾省.agentSum} },
                    {name: '香港',value: ${香港.agentSum} },
                    {name: '澳门',value: ${澳门.agentSum} }
                ]
            },
            {
                name: '内部销售数量',
                type: 'map',
                mapType: 'china',
                label: {
                    normal: {
                        show: true
                    },
                    emphasis: {
                        show: true
                    }
                },
                showLegendSymbol:false,
                data:[
                    {name: '北京',value: ${北京市.ownSum} },//键值对形式
                    {name: '天津',value: ${天津市.ownSum} },
                    {name: '上海',value: ${上海市.ownSum} },
                    {name: '重庆',value: ${重庆市.ownSum} },
                    {name: '河北',value: ${河北省.ownSum} },
                    {name: '河南',value: ${河南省.ownSum} },
                    {name: '云南',value: ${云南省.ownSum} },
                    {name: '辽宁',value: ${辽宁省.ownSum} },
                    {name: '黑龙江',value: ${黑龙江.ownSum} },
                    {name: '湖南',value: ${湖南省.ownSum} },
                    {name: '安徽',value: ${安徽省.ownSum} },
                    {name: '山东',value: ${山东省.ownSum} },
                    {name: '新疆',value: ${新疆.ownSum} },
                    {name: '江苏',value: ${江苏省.ownSum} },
                    {name: '浙江',value: ${浙江省.ownSum} },
                    {name: '江西',value: ${江西省.ownSum} },
                    {name: '湖北',value: ${湖北省.ownSum} },
                    {name: '广西',value: ${广西.ownSum} },
                    {name: '甘肃',value: ${甘肃省.ownSum} },
                    {name: '山西',value: ${山西省.ownSum} },
                    {name: '内蒙古',value: ${内蒙古.ownSum} },
                    {name: '陕西',value: ${陕西省.ownSum} },
                    {name: '吉林',value: ${吉林省.ownSum} },
                    {name: '福建',value: ${福建省.ownSum} },
                    {name: '贵州',value: ${贵州省.ownSum} },
                    {name: '广东',value: ${广东省.ownSum} },
                    {name: '青海',value: ${青海省.ownSum} },
                    {name: '西藏',value: ${西藏.ownSum} },
                    {name: '四川',value: ${四川省.ownSum} },
                    {name: '宁夏',value: ${宁夏.ownSum} },
                    {name: '海南',value: ${海南省.ownSum} },
                    {name: '台湾',value: ${台湾省.ownSum} },
                    {name: '香港',value: ${香港.ownSum} },
                    {name: '澳门',value: ${澳门.ownSum} }
                ]
            }
        ]
    };
    myChart.setOption(option);
};
</script>
</body>
</html>